package top.psjj.ssm.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 4.解释这个类的作用 共 1分
 *
 * spring的配置类
 * 扫描那些类要配置成bean
 * 导入文件
 *spring整合mybatis
 * 开启事务
 */
@Configuration
@ComponentScan({"top.psjj.ssm.service","top.psjj.ssm.mapper"})
@PropertySource("classpath:jdbc.properties")
@Import({JdbcConfig.class,MybatisConfig.class})
@EnableTransactionManagement
public class SpringConfig {

}
